package com.example.alldemo.rabitmq;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "MyRabitMQqueue")
public class Receiver2 {

    @RabbitHandler
    public void handler2(String message){
        System.out.println("接收消息2："+message);
    }

}
